<?php

/*
|--------------------------------------------------------------------------
| Application Routes
|--------------------------------------------------------------------------
|
| Here is where you can register all of the routes for an application.
| It's a breeze. Simply tell Laravel the URIs it should respond to
| and give it the controller to call when that URI is requested.
|
*/



/**
 * 前台首页路由
 */
Route::get('/',"Home\IndexController@index");
/**
 * 首页点赞路由
 */
Route::get('/apraise',"Home\IndexController@apraise");
/**
 * 首页收藏回答路由
 */
Route::get('/favor',"Home\IndexController@favor");
/**
 * 首页回答的评论
 */
Route::get("/comments","Home\IndexController@comments");
/**
 * 首页评论的点赞
 */
Route::get("/cpraise","Home\IndexController@cpraise");
/**
 * 首页点击查看其他人的回答
 */
Route::get("/people/answers/{id}","Home\IndexController@peopleanswer");
/**
 * 点击关注他
 */
Route::get("/follow_him","Home\IndexController@follow_him");
/**
 * 首页点击查看他的关注者
 */
Route::get("/people/followers/{id}","Home\IndexController@peoplefollows");
//个人中心中 提问的问题列表
Route::get("/people/questions/{id}","Home\IndexController@peoplequestions");
// =========================项目开始================================

 // 叼振前台路由

Route::get('/question/{id}/{userid}','Home\QuestionController@question');

<<<<<<< HEAD

// 显示问题回答详情页面
// Route::get('/question/{id}','Home\QuestionController@question');
=======
Route::get('/question/{id}/{user_id}','Home\QuestionController@question');
Route::get('/sendajax', 'Home\AjaxController@topic');
// 对点赞的处理
Route::get('/dealpraise', 'Home\AjaxController@apraise');
// 对反对的处理
Route::get('/opisit', 'Home\AjaxController@opisit');
// 对悬浮框话题关注与取消关注的处理
Route::get('/attention', 'Home\AjaxController@attention');
//  对当前话题进行关注或取消关注
Route::get('questionAttention', 'Home\AjaxController@questionAttention');
//  显示回答问题者的悬浮框
Route::get('/people', 'Home\AjaxController@people');
//  显示所有评论
Route::get('/praise', 'Home\question\PraiseController@showPraises');


/*
	刁民后台路由
*/
Route::group(['middleware'=>'adminlogin'],function(){
//用户管理
Route::controller('/admin/user','Admin\UserController');
//后台首页
Route::get('/admin','Admin\AdminController@index');
});
//验证码
Route::get('/vcode','Admin\LoginController@vcode');
//后台登录
Route::controller('/admin/login','Admin\LoginController');
>>>>>>> a7738a50e969c7b1e168c752f78aca595ad4c369

/*
	刁民前台路由
*/
//前台注册
Route::get('/register','Home\RegisController@register');
Route::post('/register','Home\RegisController@doregister');
//手机验证码
Route::get('/send','Home\RegisController@sendMess');
//登录
Route::get('/login','Home\LoginController@login');
Route::post('/login','Home\LoginController@doLogin');
Route::get('/vcode','Home\LoginController@vcode');
//验证用户是否注册
Route::get('/phonecheck','Home\RegisController@doCheck');
//找回密码
Route::get('/back','Home\BackController@back');
Route::post('/back','Home\BackController@doback');


/**
 * 祥哥后台问题路由
 */
//问题的删查
Route::controller('/admin/question','Admin\QuestionController');
//答案的删查
Route::controller('/admin/answer','Admin\AnswerController');
/**
 * 祥哥前台
 */
//话题
Route::get('/home/topic/index','Home\TopicController@index');
Route::get('/home/topic/question','Home\TopicController@question');

//后台登录
Route::controller('/admin/login','Admin\LoginController');
//验证码
Route::get('/vcode','Admin\LoginController@vcode');
/**
 * 叼建路由
 */
Route::controller("/admin/topic","Admin\TopicController");




